home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / docs / mon1438h.lha / MicroVitec-Drivers.doc < prev    next >
Text File  |  1995-10-03  |  10KB  |  312 lines

  1. o    Author: António Manuel Tavares de Oliveira Santos
  2.  
  3. any comments, money, postcards, sweets, candys, pictures, programs, sources, books
  4.  should be directed to:
  5.  
  6.     António Manuel Santos
  7.     Rua do Zaire, 5 1ºdto
  8.     1170 Lisbon, Portugal
  9.     
  10. or
  11.     L38058@ALFA.IST.UTL.PT
  12.  
  13.  
  14. António Manuel Santos | Electronic Computers and Systems Engineer Course - 4th year - IST
  15. Rua do Zaire, 5 1ºdto | Email: L38058@ALFA.IST.UTL.PT, http://alfa.ist.utl.pt/~l38058/
  16. 1170 Lisbon, Portugal | Home Phone: +01 8145439
  17. -----------------------------------------------------------------------------------------
  18. C:> dir
  19. dir : memory not found at address 0xDEADF00D
  20. -----------------------------------------------------------------------------------------
  21.  
  22.  
  23. o    What you need:
  24.     An Hex File Editor - AZap from aminet for example.
  25.     MonEd from Aminet.
  26.     Some patience :)
  27.     
  28. o   ONLY DO THESE STEPS IF YOU ARE A FAMILIRIZED AMIGA USER. PLEASE DONT SEND FLAMES TO ME
  29.     IF YOU BLOW UP YOUR MONITOR. I SHALL *NOT* BE RESPONSABLE BY SUCH. INFACT, DONT READ THIS
  30.     FILE AT ALL. ALL THESE INSTRUCTIONS COULD BE TOTALLY CRAP !!! IT COULD LEAVE YOUR
  31.     HARDWARE/MONITOR TO NUTS !!!!!!!!!!!!!!!!!!!!!!!!!!!!! THANKS ...
  32.  
  33. o    All works fine to me. I use DBLPAL:High Res No Flicker 720 x 540 all the time.
  34.  
  35. o    Sorry for some spagheeti text, but maybe some one can organize this :)    
  36.  
  37.  
  38. o    What will you gain with this text file :
  39.  
  40.     On MicroVitec 1438 Monitors, I will get these nice screen modes:
  41.                             
  42.                                     Visible Size                Refresh Rates
  43.     ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  44.     DBLPAL:High Res                    720 x  270                    49Hz, 27.58KHz
  45.     DBLPAL:High Res Laced            720 x 1080                    49Hz, 27.58KHz
  46.     DBLPAL:High Res No Flicker        720 x  540                    49Hz, 27.58KHz
  47.     DBLPAL:Low Res                    360 x  270                    49Hz, 27.58KHz
  48.     DBLPAL:Low Res Laced            360 x 1080                    49Hz, 27.58KHz
  49.     DBLPAL:Low Res No Flicker        360 x  540                    49Hz, 27.58KHz
  50.     MULTISCAN:640 x 240                640 x  300                    48Hz, 30.00KHz *
  51.     MULTISCAN:Productivity            640 x  600                    48Hz, 30.00KHz *
  52.     MULTISCAN:Productivity Laced    640 x 1200                    48Hz, 30.00KHz *
  53.     SUPER72:400 x 150                456 x  153                    71Hz, 23.21KHz *
  54.     SUPER72:800 x 150                912 x  153                    71Hz, 23.21KHz *
  55.     SUPER72:High Res                456 x  306                    71Hz, 23.21KHz *
  56.     SUPER72:High Res Laced            456 x  612                    71Hz, 23.21KHz *
  57.     SUPER72:Super-High Res            912 x  306                    71Hz, 23.21KHz *
  58.     SUPER72:Super-high Res Laced    912 x  612                    71Hz, 23.21KHz *
  59.     
  60.     * - You can improve the number of vertical lines (TOTROWS) at the expense of
  61.     refresh rate. You can get as high as 912x700 (or so) in SUPER72. But it will
  62.     flicker a lot.
  63.     
  64.     
  65.     These tooltypes were written by the MonEd package from aminet. What I just simple
  66.     did was to edit the prefs file EnvArc:Sys/Overscan.prefs to reflect the maximum
  67.     overscan possible that the AGA chips and monitor could cope.
  68.     So, change the tooltypes acording:
  69.     
  70.         - Tooltypes for Sys:Devs/Monitors/Multiscan -
  71.     
  72.         TOTROWS=0x271
  73.         TOTCLKS=0x77
  74.         HBSTRT=0x02
  75.         HBSTOP=0x2a
  76.         VBSTRT=0x02
  77.         VBSTOP=0xcaf
  78.     
  79.         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  80.     
  81.         - Tooltypes for Sys:Devs/Monitors/Super72 -
  82.     
  83.         TOTROWS=0x147
  84.         TOTCLKS=0x99
  85.         HBSTRT=0x02
  86.         HBSTOP=0x21
  87.         VBSTRT=0x00
  88.         VBSTOP=0x71e
  89.     
  90.         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  91.     
  92.         - Tooltypes for Sys:Devs/Monitors/DblPAL -
  93.     
  94.         TOTROWS=0x233
  95.         TOTCLKS=0x81
  96.         HBSTRT=0x01
  97.         HBSTOP=0x29
  98.         VBSTRT=0x00
  99.         VBSTOP=0x00
  100.     
  101.         ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  102.     Or edit them using MonEd. Don't forget to change the HBSTRT, HBSTOP, VBSTRT,
  103.     VBSTOP to let the blackborder less visible (so that you gain more space to display
  104.     image). And change the TOTCLKS as you like and lower the refresh rate by changing
  105.     TOTROWS. My DblPAL is 49Hz vertically and 27.5870 KHz horizontaly. I note no flickering.
  106.     If you think that your ScreenMode flickers, but a CRT Filter for your monitor. That will
  107.     great enhance the Screen and protect your eyes. And the flicker will be a lot less.
  108.     
  109.     And now for the EnvArc:Sys/Overscan.prefs (uuencoded)
  110.     
  111. -----8<-------------------CUT HERE--------------------8<-----    
  112. begin 677 EnvArc:Sys/Overscan.prefs
  113. M1D]230```,)04D5&4%)(1`````8```````!/4T-.````)`````#^W+J)`!``
  114. M&@"!`X$`"I`$`%$`%P+0`AP``````L\")4]30TX````D`````/[<NHD`%0`?
  115. M`\@'D``#D"0`4P`9`H`"6``````"?P)73U-#3@```"0`````_MRZB0``````
  116. M``````*0``!^`"`"@`$```````)_`/]/4T-.````)`````#^W+J)``P`&@"9
  117. 6`88`")`D`%$`%0.0`F0``````X\"8_]/
  118. `
  119. end
  120. -----8<-------------------CUT HERE--------------------8<-----    
  121.  
  122.     How did I made this Overscan.prefs file :
  123.     
  124.     First you need the Includes from Commodore. You can get the includes from a 
  125.     mounted MeatingPerls CDROM on internet by FTP. Just ask some one in the net
  126.     cause I don't got the address here. I am writing this text at home on my
  127.     cool Amiga :)
  128.     
  129.     But here is a part from the includes that you need to make the changes:
  130.     
  131.     - some structure definitions that helped -
  132.  
  133. include:graphics/gfx.h line 39 defines "tPoint" (struct)
  134.  
  135. struct tPoint
  136. {
  137.    WORD x;                              0000
  138.    WORD y;                              0002
  139. };
  140.  
  141.  
  142. include:graphics/gfx.h line 41 defines "Point" (typedef)
  143.  
  144. typedef struct tPoint Point;
  145.  
  146.  
  147. include:graphics/gfx.h line 27 defines "Rectangle" (struct)
  148.  
  149. struct Rectangle
  150. {
  151.    WORD MinX;                           0000
  152.    WORD MinY;                           0002
  153.    WORD MaxX;                           0004
  154.    WORD MaxY;                           0006
  155. };
  156.  
  157. #define ID_OSCN MAKE_ID('O','S','C','N')
  158.  
  159. #define OSCAN_MAGIC  0xFEDCBA89
  160.  
  161.  
  162. struct OverscanPrefs
  163. {
  164.     ULONG         os_Reserved;
  165.     ULONG         os_Magic;
  166.     UWORD         os_HStart;
  167.     UWORD         os_HStop;
  168.     UWORD         os_VStart;
  169.     UWORD         os_VStop;
  170.     ULONG         os_DisplayID;
  171.     Point         os_ViewPos;
  172.     Point         os_Text;
  173.     struct Rectangle os_Standard;
  174. };
  175.     
  176.     ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  177.     
  178.     Ok, what I did was: using my program called ModeID I noted down the mode that I wanted
  179.     change. Then I loaded Env:Sys/Overscan.prefs into a HexEditor (AZap is a good one ) and
  180.     searched in the file the structure OverscanPrefs with a mode ID that I wanted to change.
  181.     This is done by searching for the sequence 'OSCN' in ascii. This sequence belongs to
  182.     the os_Reserved field in the referenced structure. Now, the mode id that I wanna change
  183.     shall be in os_DisplayID. You need to note that: ULONG are 4 bytes, UWORD are 2 bytes etc,
  184.     etc. Then I search for the corresponding values os_Text.x os_Text.y and set those to
  185.     a greater value. For example the DblPAL mode is normaly 640x512, now its 720x540. I edit
  186.     with AZap and set x to 2d0 and y to 21c (cause AZap works in hex mode). Then you must
  187.     edit the os_Standard.MaxX os_Standard.MaxY to 2cf and 21b (i.e the values that you set
  188.     before minus 1). Then I saved the edited block. The «IPrefs» Task gets notified that
  189.     Env:Sys/Overscan.prefs has changed and it sets the new preferences. So, in order to
  190.     set your Overscan, just experiment with these values on the desired screen mode.
  191.     Now, after doing this, if you are happy with the new screen mode, just do a copy to the
  192.     envarc: assign:
  193.  
  194.     $ copy Env:Sys/Overscan.prefs EnvArc:Sys/
  195.     
  196.  
  197.     Hope this explanation help's anyone. It's a bit difficult to say how to do.
  198.     
  199.     The ModeID.c source is here :
  200.     
  201. -----8<-------------------CUT HERE--------------------8<-----    
  202. /*
  203.  * $Id: ModeID.c,v 1.2 1995/02/28 21:31:04 psys Exp psys $
  204.  *
  205.  * $Log: ModeID.c,v $
  206.  * Revision 1.2  1995/02/28  21:31:04  psys
  207.  * bug in main() corrected. Was using argv[2] as second argument!
  208.  * In reality should be argv[1] !!! stupid error (arghhh!) :)
  209.  *
  210.  * Revision 1.1  1995/02/10  15:43:24  psys
  211.  * Initial revision
  212.  *
  213.  * Compiled with SASC 6.55 without any problems.
  214.  * Could not compile it with gcc 2.7.0 !!! :(
  215.  *
  216.  *
  217.  */
  218.  
  219. #include <stdio.h>
  220. #include <stdlib.h>
  221. #include <stddef.h>
  222. #include <errno.h>
  223. #include <sys/types.h>
  224. #include <string.h>
  225. #include <time.h>
  226. #ifdef __GNUC__
  227. #include <sys/time.h>
  228. #endif /* __GNUC__ */
  229.  
  230. #include <proto/exec.h>
  231. #include <proto/graphics.h>
  232.  
  233. #include <graphics/gfx.h>
  234. #include <graphics/monitor.h>
  235. #include <graphics/displayinfo.h>
  236.  
  237. static UBYTE VersTag[] = "$VER: ModeID 1.2 (28.2.95)";
  238. static char rcs_id[] = "$Id: ModeID.c,v 1.2 1995/02/28 21:31:04 psys Exp psys $";
  239.  
  240. extern struct GfxBase *GfxBase;
  241.  
  242. int FindAll(long mID,char *dummy,struct NameInfo *ni)
  243. {
  244.     /*printf("found mode : '%s'\t\t\twith id : '0x%lx'\n",ni->Name,mID);*/
  245.     printf("ModeID : 0x%08lx ; ModeName : '%s'\n",mID,ni->Name);
  246.     return 0;
  247. }
  248.  
  249. int FindByName(long mID,char *name,struct NameInfo *ni)
  250. {
  251.     if (strcmp(name,ni->Name) == 0) {
  252.         FindAll(mID,NULL,ni);
  253.         return 1;
  254.     }
  255.     else {
  256.         return 0;
  257.     }
  258. }
  259.  
  260. long ModeName2ID(char *mode,int (*checkfunc)(long,char *,struct NameInfo *))
  261. {
  262.     long    modeID;
  263.     long    queryr;
  264.     struct    NameInfo buff;
  265.     long    buff_size = sizeof(buff);
  266.     
  267.     modeID = INVALID_ID;
  268.     do {
  269.         modeID = NextDisplayInfo(modeID);
  270.         if (modeID != INVALID_ID) {
  271.             queryr = GetDisplayInfoData(NULL,(char *)&buff,buff_size,DTAG_NAME,modeID);
  272.             if (queryr == 0) {
  273.                 /*fprintf(stderr,"could not get display info data.\n");*/
  274.             }
  275.             else {
  276.                 if ( (*checkfunc)(modeID,mode,&buff) != 0) {
  277.                     break;
  278.                 }
  279.             }
  280.         }
  281.     } while ( modeID != INVALID_ID );
  282.     return modeID;
  283. }
  284.  
  285. int main(int argc,char **argv)
  286. {
  287.     if ( GfxBase = (struct GfxBase *)OpenLibrary("graphics.library",36L) ) {
  288.         if (argc == 0 || argc == 1) {
  289.             ModeName2ID(NULL,FindAll);
  290.         }
  291.         else if (argc == 2) {
  292.             ModeName2ID(argv[1],FindByName);
  293.         }
  294.         else {
  295.             fprintf(stderr,"usage: ModeID [ModeName].\nYou should enclose quotes in ModeName if needed.\n");
  296.         }
  297.         
  298.         CloseLibrary((struct Library *)GfxBase);
  299.     }
  300.     exit(0);
  301. }
  302. -----8<-------------------CUT HERE--------------------8<-----    
  303.  
  304.  
  305. António Manuel Santos | Electronic Computers and Systems Engineer Course - 4th year - IST
  306. Rua do Zaire, 5 1ºdto | Email: L38058@ALFA.IST.UTL.PT, http://alfa.ist.utl.pt/~l38058/
  307. 1170 Lisbon, Portugal | Home Phone: +01 8145439
  308. -----------------------------------------------------------------------------------------
  309. C:> dir
  310. dir : memory not found at address 0xDEADF00D
  311. -----------------------------------------------------------------------------------------
  312.